package com.bawei.rk_01

import com.alibaba.android.arouter.facade.annotation.Route
import com.alibaba.android.arouter.launcher.ARouter
import com.bawei.base.utils.mvvm.BaseAcitivity
import com.bawei.rk_01.Login.UserViewModel
import com.bawei.rk_01.databinding.ActivityUpdateBinding

@Route(path = "/app/UpdateActivity")
class UpdateActivity : BaseAcitivity<ActivityUpdateBinding,UserViewModel>() {
    override fun getViewModel(): Class<UserViewModel> {
        return UserViewModel::class.java
    }

    override fun getLayout(): Int {
        return R.layout.activity_update
    }

    override fun initView() {

        viewModel.userInfo()

        binding.textView9.setOnClickListener {
            ARouter.getInstance().build("/app/XiuGaiActivity").navigation()
        }

    }

    override fun initData() {

        viewModel.usersuccess.observe(this){
            if (it.code == 200){
                binding.user = it.data
            }
        }

    }


}